package org.linlinjava.litemall.admin.strategy.ProxyLevel4StrategyImpl;

import com.alipay.api.domain.OpenApiRoyaltyDetailInfoPojo;
import org.linlinjava.litemall.admin.strategy.Interface.AliPayStrategy;
import org.linlinjava.litemall.core.alipay.config.AliPayProperties;
import org.linlinjava.litemall.core.systemConfig.SystemConfig;
import org.linlinjava.litemall.db.domain.LitemallMechanism;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class MechanismLevel3s implements AliPayStrategy {
    @Autowired
    private AliPayProperties aliPayProperties;

    @Override
    public OpenApiRoyaltyDetailInfoPojo getModel(LitemallMechanism litemallMechanism ) {
        OpenApiRoyaltyDetailInfoPojo openApiRoyaltyDetailInfoPojo = new OpenApiRoyaltyDetailInfoPojo();
        //分出账户,也就是商家的账户pid
        openApiRoyaltyDetailInfoPojo.setTransOut(aliPayProperties.getTransOutNo());
        //分账金额收款账户pid
        openApiRoyaltyDetailInfoPojo.setTransIn(litemallMechanism.getAlpay());
        openApiRoyaltyDetailInfoPojo.setAmount(SystemConfig.getProxy4Mechanism3());
        openApiRoyaltyDetailInfoPojo.setDesc("三年标准版反馈居间服务费"+SystemConfig.getProxy4Mechanism3()+"元");
        return openApiRoyaltyDetailInfoPojo;
    }

    @Override
    public String getMechanismLevel() {
        return "43";
    }
}
